<%= [:success, :error].collect{|k| (flash || {})[k] ? content_tag("div", :id => "flash", :class => k){flash[k]} : ""}.join.html_safe %>
<% if defined?(object) && !object.nil? && object.errors.any? %>
	<div class="error">
	  <strong>Please fix the following errors:</strong>
	  <ul>
	    <% object.errors.full_messages.each do |msg| %>
	    <li><%= msg %></li>
	    <% end %>
	  </ul>
	</div>
<% end %>